// use crate::prelude::*;
// use sqlx::{Executor,Pool};
pub trait PrimaryKey<T> {

    fn get_pk(&self) ->T;
}
pub trait SessionKey<'a> {
    fn get_session_key()->&'a str;
}

pub trait GenExecute<'e>  {
    type Execute;
    fn gen_execute(&'e self)-> Self::Execute ;
}



macro_rules! impl_primary_key_for_num {
    ($num_ty:ty) => {
        impl PrimaryKey<$num_ty> for $num_ty {
            #[inline(always)]
            fn get_pk(&self) -> $num_ty {
                self.clone()
            }
        }
    };
}
impl_primary_key_for_num!(i64);
impl_primary_key_for_num!(i32);
impl_primary_key_for_num!(i16);
impl_primary_key_for_num!(i8);
impl_primary_key_for_num!(isize);
impl_primary_key_for_num!(u64);
impl_primary_key_for_num!(u32);
impl_primary_key_for_num!(u16);
impl_primary_key_for_num!(u8);
impl_primary_key_for_num!(usize);



impl<T> PrimaryKey<T> for &T where T:PrimaryKey<T> + Clone + Copy {
    fn get_pk(&self) ->T {
        *self.clone()
    }
}

